<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="language" content="en" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/main.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/ui-darkness/jquery.ui.css" />
	<script type="text/javascript" src="<?php echo Helper::getClientFile('jquery','js')?>"></script>
	<script type="text/javascript" src="<?php echo Helper::getClientFile('jquery.ui','js')?>"></script>
	<script type="text/javascript" src="<?php echo Helper::getClientFile('jquery.layout','js')?>"></script>
	<title><?php echo CHtml::encode($this->pageTitle); ?></title>
    
<script type="text/javascript">
$(document).ready(function () {
	$('body').layout({ applyDefaultStyles: true });
});
</SCRIPT>
</head>

<body>
<?php //begin layout ?>
<DIV class="ui-layout-north">
    <div id="header">
	<div class="container">
	
		<div id="logo">
			<?php //echo CHtml::image('/', CHtml::encode(Yii::app()->name))?>
			<h1><?php echo CHtml::encode(Yii::app()->name)?></h1>
		</div>
		
		<div id="nav">
			<?php $this->widget('zii.widgets.CMenu',array(
				'items'=>array(
					array('label'=>'Notes', 'url'=>array('post/admin'), 'active' => Yii::app()->getController()->getRoute() == 'post/index'),
					array('label'=>'Category', 'url'=>array('category/admin'), 'active' => Yii::app()->getController()->getRoute() == 'post/index'),
					//array('label'=>'About', 'url'=>array('/site/page', 'view'=>'about')),
					array('label'=>'Login', 'url'=>array('default/login'), 'visible'=>Yii::app()->user->isGuest),
					array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('default/logout'), 'visible'=>!Yii::app()->user->isGuest),
				),
			)); ?>
        </div>
	</div>
</div>
    
</DIV>
    <?php echo $content; ?>
<?php //end layout ?>

</body>
</html>